package com.group9.nepmserver.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.group9.nepmserver.mapper.GridCityMapper;
import com.group9.nepmserver.pojo.GridCity;
import com.group9.nepmserver.service.IGridCityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class GridCityServiceImpl implements IGridCityService{

    @Autowired
    private GridCityMapper gridCityMapper;

    @Override
    public List<GridCity> listGridCityByProvinceId(Integer provinceId) {
        QueryWrapper<GridCity> qw = new QueryWrapper<>();
        qw.eq("province_id", provinceId);
        return gridCityMapper.selectList(qw);
    }
}
